AWT Context Callbacks Structure
When you create an AWT context associated with a session, you must pass a data structure that supplies callback information. The AWT context callback data structure is defined by theJMAWTContextCallbacks
data type.
struct JMAWTContextCallbacks { UInt32 fVersion; JMRequestFrameProcPtr fRequestFrame; JMReleaseFrameProcPtr fReleaseFrame; JMUniqueMenuIDProcPtr fUniqueMenuID; JMExceptionOccurredProcPtr fExceptionOccurred; };
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion
.fRequestFrame
- A pointer to a function that creates a new frame. The client application must set up the new frame and supply callbacks for the new frame. This callback function has the following type definition:
typedef OSStatus (*JMRequestFrameProcPtr) ( JMAWTContextRef context, JMFrameRef newFrame, JMFrameKind kind, const Rect* InitialBounds, Boolean resizeable, JMFrameCallbacks* callbacks);
- For more information, see the description of the application-defined function
MyRequestFrame
.fReleaseFrame
- A pointer to a function that removes a frame. This callback function has the following type definition:
typedef OSStatus (*JMReleaseFrameProcPtr) ( JMAWTContextRef context, JMFrameRef oldFrame);
- For more information, see the application-defined function
MyReleaseFrame
.fUniqueMenuID
- A pointer to a function that allocates a unique menu ID for later use in creating a menu. This callback function has the following type definition:
typedef SInt16 (*JMUniqueMenuIDProcPtr) ( JMAWTContextRef context, Boolean isSubmenu);
- For more information, see the description of the application-defined function
MyUniqueMenuID
.fExceptionOccurred
- A pointer to an exception notification function. This function can indicate only that an error occurred; you cannot recover from the exception by using this function. This callback function has the following type definition:
typedef void (*JMExceptionOccurredProcPtr) ( JMAWTContextRef context, const JMTextRef exceptionName, const JMTextRef exceptionMsg, const JMTextRef stackTrace);
- For more information, see the description of the application-defined function
MyExceptionOccurred
.